﻿ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebServer.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>FlexiBus</title>
    <link href="StyleSheet.css" rel="stylesheet" />
    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script>

     <script>
         function initialize() {
             var input = document.getElementById('PickupLocationField');
             var autocomplete = new google.maps.places.Autocomplete(input);
         }
         google.maps.event.addDomListener(window, 'load', initialize);
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:Button ID="deleteEverything_button" runat="server" Text="Slet data" OnClick="deleteEverything_button_Click" />

    <div class="rbox round" style="margin-top:50px;">
        
        
        <table cellpadding="3" cellspacing="0" style="width:450px;margin-left:auto;margin-right:auto;">
            <tr>
                <td colspan="2"><h1>Request Transport</h1></td>
            </tr>
            <tr>
                <td>Citizen ID:</td>
                <td><input id="CitizenIdField" type="text" runat="server" style="width:100%;height:25px;" value=""/></td>
            </tr>
            <tr>
                <td>Pickup location:</td>
                <td><input id="PickupLocationField" type="text" runat="server" style="width:100%;height:25px;" value=""/></td>
            </tr>
            <tr>
                <td>Dropoff location:</td>
                <td><asp:DropDownList ID="DropOffPoints" runat="server" style="width:102%;height:30px;"></asp:DropDownList></td>
            </tr>
            <tr>
                <td>Pickup date and time:</td>
                <td>
                    <input type="text" id="DropOffDateField" value="" runat="server" style="height:25px;"/>
                    <div style="float:right;display:block;margin-right:0;padding-right:0;">
                        <input type="text" id="DropOffTimeField"  value="" runat="server" style="height:25px;margin-right:0;"/>
                    </div>

                </td>
            </tr>
            <tr>
                <td><asp:Button ID="send_button" runat="server" Text="Send Request" style="margin-top:20px;" OnClick="send_button_Click"/></td>
                <td valign="middle"><div id="infoMsg" runat="server"></div></td>
            </tr>
        </table>
    </div>

    <div class="rbox round" style="margin-top:30px;">
        <table cellpadding="3" cellspacing="0" style="width:500px;margin-left:auto;margin-right:auto;">
            <tr>
                <td colspan="2"><h1>See Transports</h1></td>
            </tr>
            <tr>
                <td>From date:</td>
                <td><input type="text" id="TfromDate" value=""  runat="server" style="height:25px;"/>
            <div style="float:right;display:block;margin-right:0;padding-right:0;">
                <input type="text" id="TfromTime"  value="" runat="server" style="height:25px;margin-right:0;"/>
            </div></td>
            </tr>
            <tr>
                <td>To date:</td>
                <td style="width:320px;"><input type="text" id="TtoDate" value="" runat="server" style="height:25px;"/>
            <div style="float:right;display:block;margin-right:0;padding-right:0;">
                <input type="text" id="TtoTime"  value="" runat="server" style="height:25px;margin-right:0;"/>
            </div></td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="getTransports_button" runat="server" Text="Get Transports" OnClick="getTransports_button_Click" />
                    </td><td> <asp:Button ID="calculateTransport_button" runat="server" Text="Calculate Directions" OnClick="calculateTransport_button_Click" />

                </td>
            </tr>
            <tr><td valign="middle" colspan="2"><div id="InfoMsg2" runat="server"></div></td></tr>
                    
    </table>

        <asp:Table ID="TransportList" runat="server" CellSpacing="0" CellPadding="3" CssClass="box round" style="width:500px;margin-left:auto;margin-right:auto;"></asp:Table>
    </div>

    
<div class="rbox round" style="margin-top:30px;">
        <table cellpadding="3" cellspacing="0" style="width:500px;margin-left:auto;margin-right:auto;">
            <tr>
                <td colspan="2"><h1>See Routes</h1></td>
            </tr>
            <tr>
                <td><asp:Table ID="routesList" runat="server" CellSpacing="0" CellPadding="3" CssClass="box round" style="width:600px;margin-left:auto;margin-right:auto;"></asp:Table></td>
            </tr>
            </table>
    </div>


    </form>
</body>
</html>
